package com.zatech.cgnci.project.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zatech.cgnci.project.dto.CgnciApprovalConfigAuthQueryDTO;
import com.zatech.cgnci.project.dto.CgnciApprovalConfigAuthUserDTO;
import com.zatech.cgnci.project.dto.CgnciApprovalConfigRoleUserDTO;
import com.zatech.cgnci.project.entity.CgnciApprovalConfigRoleUserDO;
import com.zatech.cgnci.project.vo.CgnciApprovalConfigRoleUserVO;

import java.util.List;

/**
 * <p>
 * 审批流程节点规则配置角色用户表 服务类
 * </p>
 *
 * @author Generator
 * @since 2025-02-12
 */
public interface CgnciApprovalConfigRoleUserService extends IService<CgnciApprovalConfigRoleUserDO> {

    void saveOrUpdateApprovalUser(CgnciApprovalConfigRoleUserDTO roleUserDTOList);

    List<CgnciApprovalConfigRoleUserDO> listApprovalUser(String taskType, String currentApproverNode);

    List<CgnciApprovalConfigRoleUserVO> listFlowTask(String username, String usercode);

    void saveAuthorizedUser(CgnciApprovalConfigAuthUserDTO authUserDTO);

    IPage<CgnciApprovalConfigRoleUserVO> authPage(CgnciApprovalConfigAuthQueryDTO queryDTO);

    /**
     * 查询当前用户在当前任务说属流程节点的代理人列表
     * @param taskType
     * @param currentApproverNode
     * @param usercode
     * @return
     */
    List<CgnciApprovalConfigRoleUserDO> listCreateUser(String taskType, String currentApproverNode, String usercode);

    /**
     * 回收权限
     * @param recycleAuthUser
     */
    void recycleAuthUser(CgnciApprovalConfigRoleUserDO recycleAuthUser);

    /**
     * 赋予权限
     * @param recycleAuthUser
     */
    void grantAuthUser(CgnciApprovalConfigRoleUserDO recycleAuthUser);
}
